package com.usian.user;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.apache.catalina.User;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@MapperScan("com.usian.user.mapper")
@EnableDiscoveryClient//开启注册中心的注解
@EnableFeignClients//开启远程调用 feign
@ServletComponentScan()
public class UserApp {
    public static void main(String[] args) {
        SpringApplication.run(UserApp.class,args);
    }


    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
